package com.loves.admin.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;

import java.time.LocalDateTime;

public class Produce {
    @TableId(type = IdType.ASSIGN_UUID)
    private String id;
    private String name;
    private String version;
    private String createId;
    private String parentId;
    private LocalDateTime createDate;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public String getVersion() {
        return version;
    }

    public void setVersion(String version) {
        this.version = version;
    }

    public String getCreateId() {
        return createId;
    }

    public void setCreateId(String createId) {
        this.createId = createId;
    }

    public String getParentId() {
        return parentId;
    }

    public void setParentId(String parentId) {
        this.parentId = parentId;
    }

    public LocalDateTime getCreateDate() {
        return createDate;
    }

    public void setCreateDate(LocalDateTime createDate) {
        this.createDate = createDate;
    }


    public static final class Builder {
        private String id;
        private String name;
        private String version;
        private String createId;
        private String parentId;
        private LocalDateTime createDate;

        public Builder id(String id) {
            this.id = id;
            return this;
        }

        public Builder name(String name) {
            this.name = name;
            return this;
        }

        public Builder version(String version) {
            this.version = version;
            return this;
        }

        public Builder createId(String createId) {
            this.createId = createId;
            return this;
        }

        public Builder parentId(String parentId) {
            this.parentId = parentId;
            return this;
        }

        public Builder createDate(LocalDateTime createDate) {
            this.createDate = createDate;
            return this;
        }

        public Produce build() {
            Produce produce = new Produce();
            produce.setId(id);
            produce.setName(name);
            produce.setVersion(version);
            produce.setCreateId(createId);
            produce.setParentId(parentId);
            produce.setCreateDate(createDate);
            return produce;
        }
    }
}
